﻿@page "/tables/search"
@inject IStringLocalizer<TablesSearch> Localizer

<h3>@Localizer["TablesSearchTitle"]</h3>

<h4>@((MarkupString)Localizer["TablesSearchDesc"].Value)</h4>

<Tips>
    <p>@((MarkupString)Localizer["SearchTableTips"].Value)</p>
</Tips>

<DemoBlock Title="@Localizer["SearchTableTitle"]"
           Introduction="@Localizer["SearchTableIntro"]"
           Name="SearchTable"
           Demo="typeof(Demos.Table.TablesSearch.TablesSearchTable)">
    <ul class="ul-demo mb-3">
        <li>@((MarkupString)Localizer["SearchTableLi1"].Value)</li>
        <li>@((MarkupString)Localizer["SearchTableLi2"].Value)</li>
        <li>@((MarkupString)Localizer["SearchTableLi3"].Value)</li>
    </ul>
</DemoBlock>

<DemoBlock Title="@Localizer["AutoGenerateSearchTitle"]"
           Introduction="@Localizer["AutoGenerateSearchIntro"]"
           Name="AutoGenerateSearch"
           Demo="typeof(Demos.Table.TablesSearch.TablesAutoGenerateSearch)">
    <p>@((MarkupString)Localizer["AutoGenerateSearchP"].Value)</p>
    <Tips>@((MarkupString)Localizer["AutoGenerateSearchTips"].Value)</Tips>
    <Pre>
    if (options.Searchs.Any())
    {
        //@Localizer["AutoGenerateSearchCommnt"] FilterLogic.Or
        items = items.Where(options.Searchs.GetFilterFunc&lt;Foo&gt;(FilterLogic.Or));
    }
    </Pre>
</DemoBlock>

<DemoBlock Title="@Localizer["CustomColSearchTitle"]"
           Introduction="@Localizer["CustomColSearchIntro"]"
           Name="CustomColSearch"
           Demo="typeof(Demos.Table.TablesSearch.TablesCustomColSearch)">
        <p>@((MarkupString)Localizer["CustomColSearchP"].Value)</p>
    <p>@((MarkupString)Localizer["CustomColSearchP1"].Value)</p>
    <p>@((MarkupString)Localizer["CustomColSearchP2"].Value)</p>
    <p>@((MarkupString)Localizer["CustomColSearchP3"].Value)</p>
    <p>@((MarkupString)Localizer["CustomColSearchP4"].Value)</p>
</DemoBlock>

<DemoBlock Title="@Localizer["CustomerSearchModelTitle"]"
           Introduction="@Localizer["CustomerSearchModelIntro"]"
           Name="CustomerSearchModel"
           Demo="typeof(Demos.Table.TablesSearch.TablesCustomerSearchModel)">
    <p>@((MarkupString)Localizer["CustomerSearchModelP"].Value)</p>
</DemoBlock>
